<!DOCTYPE html>
<html>
<head>

    <link rel="stylesheet" href="/Statics/Home/css/amazeui.min.css">
    <link rel="stylesheet" href="/Statics/Home/css/reset.css">
    <link rel="stylesheet" href="/Statics/Home/css/common.css">
    <link rel="stylesheet" href="/Statics/Home/css/button.css">
    <template file="Home/meta"/>
    <template file="Home/css"/>


</head>
<body style="background: #f0eff5">


<div class="am-g ">






    <volist name="_list" id="v">





        <div class="am-cf am-bg-fff  common-border-top am-padding-vertical-sm">

            <a href="{:U('show',array('id'=>$v['id']))}">
         <div class="am-u-sm-4">

             <img src="{$v.thumb}" class="am-img-responsive" alt="">

         </div>
         <div class="am-u-sm-8">

             <h2 class="am-cf">{$v.title}</h2>


             <p class="am-margin-vertical-xs  ">
                 结束时间:{$v.endtime}
             </p>


             <div>

                 <switch name="v.jiedian">
                     <case value="1" break="0或1">

                         <a class="am-btn am-btn-primary   am-margin-right-sm  am-padding-horizontal-lg"
                            href="{:U('show',array('id'=>$v['id']))}">参加</a>
                     </case>
                     <case value="2">


                         <a class="am-btn am-btn-default am-disabled    am-margin-right-sm  am-padding-horizontal-lg"
                            href="{:U('show',array('id'=>$v['id']))}">已领完</a>
                     </case>
                     <case value="3">


                         <a class="am-btn am-btn-default am-disabled   am-margin-right-sm  am-padding-horizontal-lg"
                            href="{:U('show',array('id'=>$v['id']))}">已结束</a>
                     </case>
                     <case value="4">


                         <a class="am-btn am-btn-default am-disabled   am-margin-right-sm am-padding-horizontal-sm "
                            href="{:U('show',array('id'=>$v['id']))}">已参加</a>
                         <a class="am-btn am-btn-success     am-padding-horizontal-sm "
                            href="{:U('User/Order/pay',array('order_sn'=>$v['order_sn']))}">去付款</a>

                     </case>
                     <case value="5">


                         <a class="am-btn am-btn-default am-disabled   am-margin-right-sm am-padding-horizontal-sm "
                            href="{:U('show',array('id'=>$v['id']))}">已试吃</a>

                         <if condition="$v['product_id']">
                         <a class="am-btn am-btn-success     am-padding-horizontal-sm "
                            href="{:U('Home/Product/show',array('id'=>$v['product_id']))}">前往购买</a>
                         </if>


                     </case>
                 </switch>


             </div>



</div>
                </a>


        </div>



    </volist>
    <div class="pages am-text-center am-bg-fff common-border-top am-padding-vertical-sm">    {$Page}  </div>


    <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-index  common-border-top "
         id="">
        <template file="Home/bottom_nav" />
    </div>


</div>


</div>
<template file="Home/js"/>


</body>
</html>